package org.lg.dao;

import org.lg.dto.BaseDto;
import org.lg.entity.Student;
import org.lg.page.PageInfo;

import java.util.List;

public interface StudentDao {

    public List<Student> getAllStudents() throws Exception ;


    /**
     * 分页查询学生
     * @param pageInfo
     * @return
     */

    public List<Student> getStudentByPage(PageInfo pageInfo) throws Exception;

    /**
     * 根据主键查询 示范简单参数
     * @param sno
     * @return
     */

    public Student getStudentBySno(String sno)  throws Exception;

    /**
     * 根据班级号查询学生
     * @param cno
     * @return
     * @throws Exception
     */
    public List<Student>  getStudentByCno(String cno)  throws Exception;
    /**
     * 根据班级号分页查询学生
     * @param pageInfo
     * @return
     * @throws Exception
     */

    public List<Student>  getClassMateByCnoAndByPage(PageInfo pageInfo)  throws Exception;




    /**
     * 根据主键查询的学生关联班级和班主任信息
     * @param sno
     * @return
     * @throws Exception
     */
    public Student selectByPrimaryKeyWithClazzAndTeacher(String sno)  throws Exception;

    /**
     * 查询成绩前20的同学
     * @return
     * @throws Exception
     */
    public List<Student> getTop20Student() throws Exception ;

    /**
     * 增删改 返回值为Integer dml sql的操作结果就是整数
     * @param student
     * @return
     */


    public Integer addStudent(Student student) throws Exception;

    public Integer editStudent(Student student) throws Exception;


}
